Skip to content

Conversation

@feeblefakie
Copy link
Contributor

This is an automated request for a manual backport of the following:

  1. Resolve any conflicts that occur during the cherry-picking process.
git fetch origin &&
git checkout 3.16-pull-3092 &&
git cherry-pick --no-rerere-autoupdate -m1 024172e8a650f26bfc3019642932e0d3424c303b
  1. Push the changes.
  2. Merge this PR after all checks have passed.

Thank you!

@KodaiD KodaiD marked this pull request as ready for review October 30, 2025 10:45
@KodaiD KodaiD requested a review from Copilot October 30, 2025 10:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds validation to prevent dropping namespaces that contain any tables (both ScalarDB-managed and non-managed) without explicit force flag, providing clearer error messages to users.

  • Adds deleteMetadata() and dropTable() methods to AdminTestUtils for test cleanup
  • Implements namespace table validation in JdbcAdmin and CosmosAdmin before dropping
  • Adds new error code for namespaces with non-ScalarDB tables

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
AdminTestUtils.java Added abstract methods deleteMetadata() and dropTable() for test utilities
DistributedStorageAdminIntegrationTestBase.java Added integration test for namespace drop validation with non-managed tables
JdbcAdminTestBase.java Added unit tests for namespace drop validation across different database engines
CosmosAdminTestBase.java Added unit test for Cosmos namespace drop validation
RdbEngineStrategy.java Added interface method getTableNamesInNamespaceSql()
RdbEngineSqlite.java Implemented getTableNamesInNamespaceSql() returning null for SQLite
RdbEngineSqlServer.java Implemented SQL query to get table names for SQL Server
RdbEnginePostgresql.java Implemented SQL query to get table names for PostgreSQL
RdbEngineOracle.java Implemented SQL query to get table names for Oracle
RdbEngineMysql.java Implemented SQL query to get table names for MySQL
RdbEngineDb2.java Implemented SQL query to get table names for DB2
JdbcAdmin.java Added validation logic and getInternalTableNames() helper method
CosmosAdmin.java Added validation logic and getRawTableNames() helper method
CoreError.java Added new error code NAMESPACE_WITH_NON_SCALARDB_TABLES_CANNOT_BE_DROPPED
Multiple test utils files Implemented deleteMetadata() and dropTable() methods for various storage backends
Multiple integration test files Added getAdminTestUtils() method and disabled SQLite/DynamoDB tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KodaiD KodaiD merged commit 4c67801 into 3.16 Oct 30, 2025
62 checks passed
@KodaiD KodaiD deleted the 3.16-pull-3092 branch October 30, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants